
<script>
// import store from '@/store'
export default {
  props: {
    btnPrem: {
      type: String,
      require: true,
      default: ''
    }
  },
  computed: {
    isShowEL: {
      get() {
        const perms = this.$store.state.user.profile.permissions
        return perms.includes(this.btnPrem.replace(/'/g, '')) || perms.includes('*:*:*')
      }
    }
  },
  render() {
    // 返回要么为假，要么是默认插槽
    return this.isShowEL && this.$slots.isShow
  }
}
</script>
